package com.dingding.commonservice.facade.city;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.dingding.common.core.beans.City;
import com.dingding.commonservice.core.city.service.ICityService;
import com.dingding.facade.commonservice.common.dto.city.ResOpenCityDTO;
import com.dingding.facade.commonservice.common.dto.company.ReqServiceCity;
import com.dingding.facade.commonservice.facade.city.ICityFacade;

/**
 * 
 * @ClassName: CityFacadeImpl 
 * @Description: 开通城市服务接口实现类
 * @author YHQ
 * @date 2016年12月1日 下午2:46:04
 * @since V2.5.7
 * 
 */
@Component("openCityFacade")
public class CityFacadeImpl implements ICityFacade{

	@Resource(name = "cityService")
	private ICityService cityService;
	
	/**
	 * 
	 * @Title: getOpenCityList 
	 * @Description: 获取开通城市列表
	 * @author YHQ 
	 * @since V2.5.7
	 * @return List<ResOpenCityDTO>    返回类型
	 * 
	 */
	public List<ResOpenCityDTO> getOpenCityList() {
		
		return cityService.geOpenCityDTOs();
	}

	/**
	 * 
	 * @Title: isServiceCity 
	 * @Description: 根据城市编号获取城市信息
	 * @param reqServiceCity 客户端请求参数
	 * @author YHQ 
	 * @since V2.5.7
	 * @return City  城市信息
	 * 
	 */
	@Override
	public City isServiceCity(ReqServiceCity reqServiceCity) {
		
		return cityService.isServiceCity(reqServiceCity);
	}
	
	@Override
	public ResOpenCityDTO getOpenCityByCityId(Integer cityId) {
		
		return cityService.getOpenCityDTOByCityId(cityId);
	}
	
}
